﻿using System;
using System.Collections.Generic;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Span : HtmlElement
	{
		public Span() : base(SpanDescription.Instance) { }
	}
	public class SpanDescription : HtmlElementDescription
	{
		public static readonly SpanDescription Instance = new SpanDescription();
		private SpanDescription() : base("span") { }
		public override string Description { get { return "generic wrapper for phrasing content that by itself does not represent anything."; } }
		public override Type ControlType { get { return typeof(Span); } }
		public override bool IsPhrasingElement { get { return true; } }
	}
	public class Output : HtmlElement, WithName, WithForm, WithFor
	{
		public Output() : base(OutputDescription.Instance) { }

		public string Name { get { return this["name"]; } set { this["name"] = value; } }
		public string Form { get { return this["form"]; } set { this["form"] = value; } }
		public string For { get { return this["for"]; } set { this["for"] = value; } }
	}
	public class OutputDescription : HtmlElementDescription
	{
		public static readonly OutputDescription Instance = new OutputDescription();
		private OutputDescription() : base("output", HtmlVersion.Html5) { }
		public override string Description { get { return "result of a calculation."; } }
		public override Type ControlType { get { return typeof(Output); } }
		public override bool IsPhrasingElement { get { return true; } }
	}
	public class Bdi : HtmlElement
	{
		public Bdi() : base(BdiDescription.Instance) { }
	}
	public class BdiDescription : HtmlElementDescription
	{
		public static readonly BdiDescription Instance = new BdiDescription();
		private BdiDescription() : base("bdi", HtmlVersion.Html5) { }
		public override string Description { get { return "span of text that is isolated from its surroundings for the purposes of bidirectional text formatting."; } }
		public override Type ControlType { get { return typeof(Bdi); } }
		public override bool IsPhrasingElement { get { return true; } }
	}
	public class Bdo : HtmlElement
	{
		public Bdo() : base(BdoDescription.Instance) { }
	}
	public class BdoDescription : HtmlElementDescription
	{
		public static readonly BdoDescription Instance = new BdoDescription();
		private BdoDescription() : base("bdo") { }
		public override string Description { get { return "explicit text directionality formatting control for its children; it provides a means to specify a direction override of the Unicode BiDi algorithm."; } }
		public override Type ControlType { get { return typeof(Bdo); } }
		public override bool IsPhrasingElement { get { return true; } }
	}
	public class Pre : HtmlElement
	{
		public Pre() : base(PreDescription.Instance) { }
		public Pre(string text, bool htmlEncode = true)
			: this()
		{
			if (!string.IsNullOrWhiteSpace(text))
				AddText(text);
		}
	}
	public class PreDescription : HtmlElementDescription
	{
		public static readonly PreDescription Instance = new PreDescription();
		private PreDescription() : base("pre") { }
		public override string Description { get { return "block of preformatted text, in which structure is represented by typographic conventions rather than by elements."; } }
		public override Type ControlType { get { return typeof(Pre); } }
		public override bool IsFlowElement { get { return true; } }
	}
	public class Del : HtmlElement, WithCite, WithDateTime
	{
		public Del() : base(DelDescription.Instance) { }

		public string Cite { get { return this["cite"]; } set { this["cite"] = value; } }
		public string DateTime { get { return this["datetime"]; } set { this["datetime"] = value; } }
	}
	public class DelDescription : HtmlElementDescription
	{
		public static readonly DelDescription Instance = new DelDescription();
		private DelDescription() : base("del") { }
		public override string Description { get { return "range of text that has been deleted from a document."; } }
		public override Type ControlType { get { return typeof(Del); } }
	}
	public class Ins : HtmlElement, WithCite, WithDateTime
	{
		public Ins() : base(InsDescription.Instance) { }

		public string Cite { get { return this["cite"]; } set { this["cite"] = value; } }
		public string DateTime { get { return this["datetime"]; } set { this["datetime"] = value; } }
	}
	public class InsDescription : HtmlElementDescription
	{
		public static readonly InsDescription Instance = new InsDescription();
		private InsDescription() : base("ins") { }
		public override string Description { get { return "range of text that has been inserted (added) to a document."; } }
		public override Type ControlType { get { return typeof(Ins); } }
	}
	public class Q : HtmlElement, WithCite
	{
		public Q() : base(QDescription.Instance) { }

		public string Cite { get { return this["cite"]; } set { this["cite"] = value; } }
	}
	public class QDescription : HtmlElementDescription
	{
		public static readonly QDescription Instance = new QDescription();
		private QDescription() : base("q") { }
		public override Type ControlType { get { return typeof(Q); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "phrasing content quoted from another source."; } }
	}
	public class Sub : HtmlElement
	{
		public Sub() : base(SubDescription.Instance) { }
	}
	public class SubDescription : HtmlElementDescription
	{
		public static readonly SubDescription Instance = new SubDescription();
		private SubDescription() : base("sub") { }
		public override Type ControlType { get { return typeof(Sub); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "subscript."; } }
	}
	public class Sup : HtmlElement
	{
		public Sup() : base(SupDescription.Instance) { }
	}
	public class SupDescription : HtmlElementDescription
	{
		public static readonly SupDescription Instance = new SupDescription();
		private SupDescription() : base("sup") { }
		public override Type ControlType { get { return typeof(Sup); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "superscript."; } }
	}
	public class Strong : HtmlElement
	{
		public Strong() : base(StrongDescription.Instance) { }
	}
	public class StrongDescription : HtmlElementDescription
	{
		public static readonly StrongDescription Instance = new StrongDescription();
		private StrongDescription() : base("strong") { }
		public override Type ControlType { get { return typeof(Strong); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "span of text with strong importance."; } }
	}
	public class Small : HtmlElement
	{
		public Small() : base(SmallDescription.Instance) { }
	}
	public class SmallDescription : HtmlElementDescription
	{
		public static readonly SmallDescription Instance = new SmallDescription();
		private SmallDescription() : base("small") { }
		public override Type ControlType { get { return typeof(Small); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "so-called “fine print” or “small print”, such as legal disclaimers and caveats."; } }
	}
	public class Mark : HtmlElement
	{
		public Mark() : base(MarkDescription.Instance) { }
		public Mark(string text, bool htmlEncode = true)
			: this()
		{
			if (text != null)
				AddText(text, htmlEncode);
		}
	}
	public class MarkDescription : HtmlElementDescription
	{
		public static readonly MarkDescription Instance = new MarkDescription();
		private MarkDescription() : base("mark", HtmlVersion.Html5) { }
		public override Type ControlType { get { return typeof(Mark); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override bool OnlyPhrasingContent { get { return true; } }
		public override string Description { get { return "run of text in one document marked or highlighted for reference purposes, due to its relevance in another context."; } }
	}
	public class Var : HtmlElement
	{
		public Var() : base(VarDescription.Instance) { }
	}
	public class VarDescription : HtmlElementDescription
	{
		public static readonly VarDescription Instance = new VarDescription();
		private VarDescription() : base("var") { }
		public override Type ControlType { get { return typeof(Var); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "either a variable in a mathematical expression or programming context, or placeholder text that the reader is meant to mentally replace with some other literal value."; } }
	}
	public class Kbd : HtmlElement
	{
		public Kbd() : base(KbdDescription.Instance) { }
	}
	public class KbdDescription : HtmlElementDescription
	{
		public static readonly KbdDescription Instance = new KbdDescription();
		private KbdDescription() : base("kbd") { }
		public override Type ControlType { get { return typeof(Kbd); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "user input."; } }
	}
	public class Rp : HtmlElement
	{
		public Rp() : base(RpDescription.Instance) { }
	}
	public class RpDescription : HtmlElementDescription
	{
		public static readonly RpDescription Instance = new RpDescription();
		private RpDescription() : base("rp", HtmlVersion.Html5) { }
		public override Type ControlType { get { return typeof(Rp); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "provide parentheses around a ruby text component of a ruby annotation, to be shown by UAs that don’t support ruby annotations."; } }
		public override IEnumerable<HtmlElementDescription> PermittedParents { get { yield return RubyDescription.Instance; } }
	}
	public class Rt : HtmlElement
	{
		public Rt() : base(RtDescription.Instance) { }
	}
	public class RtDescription : HtmlElementDescription
	{
		public static readonly RtDescription Instance = new RtDescription();
		private RtDescription() : base("rt", HtmlVersion.Html5) { }
		public override Type ControlType { get { return typeof(Rt); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "provide parentheses around a ruby text component of a ruby annotation, to be shown by UAs that don’t support ruby annotations."; } }
		public override IEnumerable<HtmlElementDescription> PermittedParents { get { yield return RubyDescription.Instance; } }
	}
	public class Ruby : HtmlElement
	{
		public Ruby() : base(RubyDescription.Instance) { }
	}
	public class RubyDescription : HtmlElementDescription
	{
		public static readonly RubyDescription Instance = new RubyDescription();
		private RubyDescription() : base("ruby", HtmlVersion.Html5) { }
		public override Type ControlType { get { return typeof(Ruby); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "allows spans of phrasing content to be marked with ruby annotations."; } }
	}
	public class Samp : HtmlElement
	{
		public Samp() : base(SampDescription.Instance) { }
	}
	public class SampDescription : HtmlElementDescription
	{
		public static readonly SampDescription Instance = new SampDescription();
		private SampDescription() : base("samp") { }
		public override Type ControlType { get { return typeof(Samp); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "(sample) output from a program or computing system."; } }
	}
	public class U : HtmlElement
	{
		public U() : base(UDescription.Instance) { }
	}
	public class UDescription : HtmlElementDescription
	{
		public static readonly UDescription Instance = new UDescription();
		private UDescription() : base("u") { }
		public override Type ControlType { get { return typeof(U); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is underlining; for example, a span of text in Chinese that is a proper name (a Chinese proper name mark), or span of text that is known to be misspelled."; } }
	}
	public class B : HtmlElement
	{
		public B() : base(BDescription.Instance) { }
	}
	public class BDescription : HtmlElementDescription
	{
		public static readonly BDescription Instance = new BDescription();
		private BDescription() : base("b") { }
		public override Type ControlType { get { return typeof(B); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is bold text; for example, keywords in a document abstract, or product names in a review."; } }
	}
	public class I : HtmlElement
	{
		public I() : base(IDescription.Instance) { }
	}
	public class IDescription : HtmlElementDescription
	{
		public static readonly IDescription Instance = new IDescription();
		private IDescription() : base("i") { }
		public override Type ControlType { get { return typeof(I); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is italic text; for example, a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, or a ship name."; } }
	}
	public class S : HtmlElement
	{
		public S() : base(SDescription.Instance) { }
	}
	public class SDescription : HtmlElementDescription
	{
		public static readonly SDescription Instance = new SDescription();
		private SDescription() : base("s") { }
		public override Type ControlType { get { return typeof(S); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "contents that are no longer accurate or no longer relevant and that therefore has been “struck” from the document."; } }
	}
	public class Em : HtmlElement
	{
		public Em() : base(EmDescription.Instance) { }
	}
	public class EmDescription : HtmlElementDescription
	{
		public static readonly EmDescription Instance = new EmDescription();
		private EmDescription() : base("em") { }
		public override Type ControlType { get { return typeof(Em); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "span of text with emphatic stress."; } }
	}
	public class Abbr : HtmlElement
	{
		public Abbr() : base(AbbrDescription.Instance) { }
	}
	public class AbbrDescription : HtmlElementDescription
	{
		public static readonly AbbrDescription Instance = new AbbrDescription();
		private AbbrDescription() : base("abbr") { }
		public override Type ControlType { get { return typeof(Abbr); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "abbreviation or acronym."; } }
	}
	public class Address : HtmlElement
	{
		public Address() : base(AddressDescription.Instance) { }
	}
	public class AddressDescription : HtmlElementDescription
	{
		public static readonly AddressDescription Instance = new AddressDescription();
		private AddressDescription() : base("address") { }
		public override Type ControlType { get { return typeof(Address); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "contact information"; } }
	}
	public class Dfn : HtmlElement
	{
		public Dfn() : base(DfnDescription.Instance) { }
	}
	public class DfnDescription : HtmlElementDescription
	{
		public static readonly DfnDescription Instance = new DfnDescription();
		private DfnDescription() : base("dfn") { }
		public override Type ControlType { get { return typeof(Dfn); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "defining instance of a term."; } }
	}
	public class Code : HtmlElement
	{
		public Code() : base(CodeDescription.Instance) { }
	}
	public class CodeDescription : HtmlElementDescription
	{
		public static readonly CodeDescription Instance = new CodeDescription();
		private CodeDescription() : base("code") { }
		public override Type ControlType { get { return typeof(Code); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override bool OnlyPhrasingContent { get { return true; } }
		public override string Description { get { return "fragment of computer code."; } }
	}
	public class Cite : HtmlElement
	{
		public Cite() : base(CiteDescription.Instance) { }
	}
	public class CiteDescription : HtmlElementDescription
	{
		public static readonly CiteDescription Instance = new CiteDescription();
		private CiteDescription() : base("cite") { }
		public override Type ControlType { get { return typeof(Cite); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override bool OnlyPhrasingContent { get { return true; } }
		public override string Description { get { return "cited title of a work; for example, the title of a book mentioned within the main text flow of a document."; } }
	}
	public class Time : HtmlElement, WithDateTime
	{
		public Time() : base(TimeDescription.Instance) { }
		public string DateTime { get { return this["datetime"]; } set { this["datetime"] = value; } }
	}
	public class TimeDescription : HtmlElementDescription
	{
		public static readonly TimeDescription Instance = new TimeDescription();
		private TimeDescription() : base("time", HtmlVersion.Html5) { }
		public override Type ControlType { get { return typeof(Time); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override string Description { get { return "date and/or time."; } }
	}
	public class BlockQuote : HtmlElement, WithCite
	{
		public BlockQuote() : base(BlockQuoteDescription.Instance) { }
		public string Cite { get { return this["cite"]; } set { this["cite"] = value; } }
	}
	public class BlockQuoteDescription : HtmlElementDescription
	{
		public static readonly BlockQuoteDescription Instance = new BlockQuoteDescription();
		private BlockQuoteDescription() : base("blockquote") { }
		public override Type ControlType { get { return typeof(BlockQuote); } }
		public override bool IsFlowElement { get { return true; } }
		public override string Description { get { return "section that is quoted from another source."; } }
	}
}
